<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>否定和动态伪类选择器</title>
    <style>
        /* li:not(:first-child){
            background: yellow;
        } */

        li:not(:nth-child(2n+1)){
            background-color: yellow;
        }

        div{
            width: 100px;
            height: 100px;
        }

        div:not(:empty){
            background-color: red;
        }
    </style>
</head>
<body>
    <ul>
        <li>1111</li>
        <li>2222</li>
        <li>3333</li>
        <li>4444</li>
    </ul>

    <div>1111</div>
    <div></div>
</body>
</html>